import { h }    from 'snabbdom/build/package/h'
import { init } from 'snabbdom/build/package/init'
// 下面内容请按需导入
// import { classModule } from 'snabbdom/build/package/modules/class'
import { propsModule } from 'snabbdom/build/package/modules/props.js'
import { styleModule } from 'snabbdom/build/package/modules/style.js'
// import { eventListenersModule } from 'snabbdom/build/package/modules/eventlisteners.js'

import imgsrc from './images/Ciqc1F7zUZ-AWP5NAAN0Z_t_hDY449.png'

const patch = init([
    styleModule,
    propsModule
])

let vnode1 = h('img', {
    props: {
        src:imgsrc,
        alt: "Ciqc1F7zUZ-AWP5NAAN0Z_t_hDY449"
    },
    style:{
        "zoom":"50%"
    }
})

let vnode2 = h('b', {
    style:{
        "color":"red"
    }
},'Snabbdom 版本升级过快, 新版本中 h、init 函数的引入方式如下：')

let app = document.querySelector('#app')

let oldVnode = patch(app,h('div#app',[vnode1,vnode2]))